var EventUtil={
       addHandler:function(element,type,handler){

       	if(element.addEventListener){
       		element.addEventListener(type,handler,false);
       	}else if(element.attachEvent){
       		element.attachEvent("on"+type,handler);
       	}else{
       		element["on"+type]=handler;
       	}
       },
       getEvent:function(event){
           return event?event:window.envent;
       },
       getTarget:function(event){
           return event.target||event.srcElement;
       },
       getWheelDelta:function(event){
            if(event.wheelDelta){
                  return(client.engine.opera && client.engine.opera < 9.5 ? -event.wheelDelta : event.wheelDelta);
            }else{
                  return -event.detail*40;
            }
       },
       preventDefault:function(event){
       	    if(event.preventDefault){
       	    	event.preventDefault();
       	    }else{
       	    	event.returnValue=false;
       	    }
       },
        removeHandler:function(element,type,handler){
       	if(element.removeEventListener){
       		element.removeEventListener(type,handler,false);
       	}else if(element.detachEvent){
       		element.detachEvent("on"+type,handler);
       	}else{
       		element["on"+type]=null;
       	}
       },
       stopPropagation:function(){
	   	 if(event.stopPropagation){
	   	 	event.stopPropagation();
	   	 }else{
	   	 	event.cancelBubble=true;
	   	 }
       }
       
}
var client=function(){
      var engine={
            ie:0,
            gecko:0,
            webkit:0,
            khtml:0,
            oprera:0,
            ver:null

      };
      return{engine:engine};
}();
var ua=navigator.userAgent;
console.log(ua);
if(window.opera){
   client.ver=window.opera.version();
   client.opera=parseFloat(client.ver);
}else if(/AppleWebKit\/(\s+)/.test(ua)){
   client.ver=RegExp["$1"];
   client.webkit=parseFloat(client.ver);

}else if(/KHTML\/(\S+)/.test(ua) || /Konqueror\/([^;]+)/.test(ua)){
      client.ver=RegExp["$1"];
      client.khtml=parseFloat(client.ver)
}else if(/rv:([^\)]+)\) Gecko\/\d{8}/.test(ua)){
      client.ver=RegExp["$1"];
      client.khtml=parseFloat(client.ver);

}else if(/MSIE([^;]+)/.test(ua)){
      client.ver=RegExp["$1"];
      client.ie=parseFloat(client.ver);
}
